1. Field of the Invention
The present invention relates to a technique for debugging object oriented software applications. More particularly, the present invention provides a data triggered trace support in a debugger for debugging object oriented software programs.
2. Description of the Related Art
One critical and often overlooked component in the process of developing software programs is the elimination of errors from the software programs. The process of eliminating errors is known as debugging. After one or more software developers writes the code for a software program and the code files are built to produce an executable version of the software program, the software program must be tested to determine what errors exists in the program, and then the program must be debugged to reduce or eliminate the errors. For commercial software, it is imperative that most of the errors or bugs are found and eliminated prior to the software being released to the marketplace. The debugging process can be quite extensive, costly and time consuming. Accordingly, software tools and techniques have been developed to assist in the debugging of code and reduce the debugging cycle time.
For errors or bugs found in commercial software applications that have already been released, time is critical. Software manufactures must have tools to respond to customer complaints about bugs rapidly and provide fixes and/or debugged software quickly. Software errors or bugs can be categorized into two types. The first type is a logic error, in which logic statements or commands included by the software developer in the program are flawed, such that the desired function is not performed during execution of the program, or is not performed properly, etc. Typically, logic errors cause the program to execute functions or commands within the program which are not desired by the developer. The second type of error is with regard to data being maintained or used by the program, and occurs when the data is somehow corrupted.
A number of debugging functions and techniques are presently employed in currently available debugging software tools. One set of known techniques are referred to as testpoints, and include the setting of breakpoints, tracepoints, watchpoints, etc. However, the use of tracepoints is somewhat limited. While tools exist to set tracepoints so as to trigger a creation of trace information upon the execution of a specific logic unit in a program being debugged, no similar mechanism exists for setting tracepoints so as to trigger tracing relative to specific data elements or entities, such as instance variables in Smalltalk language programs, within or utilized by a program being debugged. The existing logic based trace function can create information regarding data movement, but only in the context of data movement that occurs upon the execution of a logic unit, such as a Smalltalk method. Further, information is created relative to all data components affected by execution of the logic unit. Where the information is being sought relative to a single data entity, the logic-based tracepoint procedure is costly in terms of processing time, since information relative to all affected data components is gathered, and in terms of developer time, as the developer must sort through information relevant to all affected data components to find information pertaining to the desired one. The ability to trigger the generation of trace data based upon a specific data component so that information can be obtained relative to the data component during execution of logic units would be a valuable tool for developers in the debugging of programs.
Recently, a revolution of sorts has been occurring in the software industry. Until recently, most software programs have been written in procedural languages, such as C and COBOL. Accordingly, debugging tools and techniques were designed to debug procedural programs. The advent of object oriented languages has created a paradigm shift. Object oriented languages are fundamentally different in the way they are written by developers and executed by a computer at runtime. In the two leading object oriented languages, C++ and Smalltalk, data is actually stored within the objects in object oriented programs written in these languages. In Smalltalk, data is stored in the instance variables of Smalltalk objects and the class variables or class instance variables of Smalltalk classes, and in C++, data is stored in the variables of the C++ objects. Thus, object oriented programs present new challenges for debugging tools.
U.S. Pat. No. 5,093,914, which issued to Coplien et al., discloses a method for using breakpoints in the debugging of object oriented programs. This patent is of interest because a breakpoint is one type of test point. However, the Coplien patent does not address tracepoints, and does not address the problem of or provide a solution for the lack of a trace function relative to data components of an object oriented program.
IBM's cross system product (CSP), version 4.1, which was released in 1992, provides an object oriented solution for the debugging of procedural programs. However, while that product provides for the use of tracepoints relative to logic units, it does not enable the setting of tracepoints relative to data components in a procedural program.
Accordingly, a need exists for a debugging tool which permits a developer to set tracepoints for specific data components within an object oriented program under going debugging in order to gather trace information specific to the designated data components.